package com.shiliao.framework.mvp.presenter;

import android.content.Context;
import android.view.View;

import com.shiliao.framework.mvp.service.IBaseService;
import com.shiliao.framework.network.ICallBack;

import java.util.Map;

/**
 * Created by yx on 2017/6/9.
 */

public abstract class IBasePresenter<T extends IBaseService> {
    private T mService;

    protected void setService(T service) {
        mService = service;
    }

    /**
     * 加载数据
     */
    public void loadData() {

    }

    /**
     * 加载更多数据
     */
    public void loadMoreData() {

    }

    /**
     * 图片加载
     */
    public void loadImageView(Context context, View imageView, String Url, int defaultImage) {
        mService.loadImageView(context, imageView, Url, defaultImage);
    }

    /**
     * 传参数的网络加载
     *
     * @param url
     * @param param
     * @param mCallBack
     */
    public void loadData(String url, Map param, ICallBack mCallBack) {
        mService.loadData(url, param, mCallBack);
    }


}
